Wait for a browser page load to complete before returning.
#include <IE.au3>
_IELoadWait ( ByRef $o_object [, $i_delay = 0 [, $i_timeout = -1]] )
Parameters
$o_object | Object variable of an InternetExplorer.Application |
$i_delay | Optional: Milliseconds to wait before checking status |
$i_timeout | Optional: Period of time to wait before exiting function (default = 300000 ms aka 5 min) |
Return Value
Success: | Returns 1 |
Failure: | Returns 0 and sets @ERROR |
@Error: | 0 ($_IEStatus_Success) = No Error |
1 ($_IEStatus_GeneralError) = General Error | |
3 ($_IEStatus_InvalidDataType) = Invalid Data Type | |
4 ($_IEStatus_InvalidObjectType) = Invalid Object Type | |
6 ($_IEStatus_LoadWaitTimeout) = Load Wait Timeout | |
8 ($_IEStatus_AccessIsDenied) = Access Is Denied | |
@Extended: | Contains invalid parameter number |
Remarks
Several IE.au3 functions call _IELoadWait() automatically (e.g. _IECreate(), _IENavigate() etc.). Most functions that do this also allow you to turn this off with a $f_wait parameter if you do not want the wait or if you want to call it yourself.
Related
_IELoadWaitTimeout, _IECreate, _IENavigate, _IEFormSubmit, _IELinkClickByText, _IELinkClickByIndex, _IEImgClick, _IEFormImageClick, _IEBodyWriteHTML, _IEDocWriteHTML, _IEAction
Example
; *******************************************************
; Example 1 - Open the AutoIt forum page, tab to the "View new posts"
; link and activate the link with the enter key.
; Then wait for the page load to complete before moving on.
; *******************************************************
;
#include <IE.au3>
$oIE = _IECreate ("http://www.autoitscript.com/forum/index.php")
Send("{TAB 12}")
Send("{ENTER}")
_IELoadWait ($oIE)